package com.bocai.eelly.activitys;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.webkit.WebView;
import android.widget.TextView;

import com.bocai.eelly.R;
import com.bocai.eelly.common.BaseActivity;
import com.bocai.eelly.common.ToolbarHelper;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 货代询价详情
 */
public class HuodaiInquiryDetailActivity extends BaseActivity implements View.OnClickListener{

    @Bind(R.id.tv_title)
    TextView tvTitle;
    @Bind(R.id.toolbar)
    Toolbar toolbar;
    @Bind(R.id.wv_huodai_inquiry_detail)
    WebView wvHuodaiInquiryDetail;
    @Bind(R.id.tv_huodai_inquiry_detail_offer)
    TextView tvHuodaiInquiryDetailOffer;
    private String huodaiId;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_huodai_inquiry_detail);
        ButterKnife.bind(this);
        huodaiId=getIntent().getStringExtra("huodaiId");
        initView();
        initEvent();
    }

    private void initEvent() {
        tvHuodaiInquiryDetailOffer.setOnClickListener(this);
    }

    private void initView() {
        ToolbarHelper.setup(this, R.string.str_title_offer_detail, R.mipmap.ic_back, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
        wvHuodaiInquiryDetail.loadUrl("");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId())
        {
            case R.id.tv_huodai_inquiry_detail_offer:
                Intent intent=new Intent(this,PostHuodaiOfferActivity.class);
                intent.putExtra("huodaiId",huodaiId);
                startActivity(intent);
                break;
        }
    }
}
